﻿@using EasyUIMvc

@{
    ViewBag.Title = "DataGrid";
}

<h2>DataGrid</h2>
@*<table class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px"
            data-options="url:'/Sample/GetJson'">
        <thead>
            <tr>
                <th data-options="field:'Id',width:80">ID</th>
                <th data-options="field:'Name',width:100">Name</th>
                <th data-options="field:'Age',width:80,align:'right'">Age</th>
            </tr>
        </thead>
</table>*@
@Html.EasyUI().DataGrid(settings =>
{
    settings.Id = "dg";
    settings.Title = "My datagrid";
    settings.DataOptions = "url:'/Sample/GetJson'";
}).Bind(
        new Dictionary<string, string> { 
            {"field:'Id'","Id"},
            {"field:'Name'","Name"},
            {"field:'Age'","Age"}
        }).GetHtml()
    
    